<style type="text/css">
#winBodyContainer{
	overflow-y: scroll;
	height: 500px;
}
</style>
<div style="width:720px;">
	<div class="form_data">
		<form action="{:U('Finance/win_select_user')}" method="get" filterValid="true">
		<div class="mod_data">
			<div class="input_data">
				<eq name="_city_id" value="">
					<php>$is_wrap_html=2;</php>
					<include file="Public:city_select"/>
				</eq>
				用户ID
				<input type="text" name="user_id" id="w100" value="{$user_id}">
				姓名
				<input type="text" name="realname" id="w100" value="{$realname}">
				手机号
				<input type="text" name="mobile" id="w100" value="{$mobile}">
				<input type="hidden" name="user_type" id="w100" value="{$user_type}">
				<input type="submit" value="搜索" class="btn1" style="width:auto;height:auto;padding:3px 15px;">
			</div>
		</div>
		</form>
	</div>
	<div class="data_list">
		<table>
			<tr>
				<th>UserID</th>
				<th>姓名</th>
				<th>手机号</th>
				<th>账户余额</th>
				<th>操作</th>
			</tr>
			<volist name="list" id="rs">
			<tr>
				<td>{$rs['user_id']}</td>
				<td>
					<span class="user_name">{$rs['realname']}</span>
				</td>
				<td>
					<span class="mobile">{$rs['mobile']}</span>
				</td>
				<td>
					<span class="account_balance">{$rs['account_balance']}</span>
				</td>
				<td>
					<input type="hidden" class="user_id" value="{$rs['user_id']}">
					<span class="btn3 add_items">选择</span>
				</td>
			</tr>
			</volist>
		</table>
	</div>
</div>

<div class="page">{$page}</div>
<script type="text/javascript">
$(document).ready(function() {
	$(".add_items").click(function(){
		items           = $(this).parent().parent();
		user_id         = items.find('.user_id').val();
		user_name       = items.find('.user_name').text();
		mobile          = items.find('.mobile').text();
		account_balance = items.find('.account_balance').text();

		html  = '<li>'+user_name+' ('+mobile+')';
		html += '<input type="hidden" name="user_id" value="'+user_id+'"> ';
		html += '<span>X</span>';
		html +=	'</li>';

		$('.city_id_list').html(html).show();
		$('.select_user').hide();
		$('.account_balance').text(account_balance);
		$.winRemove();
	});
});
</script>
